import { FILENAME_MUTATION, MENU_VISIBLE, SETTING_VISIBLE, BOOK_HANDLE, DEFAUTLT_FONTSIZE, DEFAULT_FAMILY, FONT_FAMILY_VISIBLE, DEFAULT_THEME } from './mutation-types'

export default {
  [FILENAME_MUTATION](state, newData) {
    state.fileName = newData
  },
  [MENU_VISIBLE](state, newData) {
    state.menuVisible = newData
  },
  [SETTING_VISIBLE](state, newData) {
    state.settingVisible = newData
  },
  [BOOK_HANDLE](state, newData) {
    state.bookHandle = newData
  },
  [DEFAUTLT_FONTSIZE](state, newData) {
    state.defaultFontSize = newData
  },
  [DEFAULT_FAMILY](state, newData) {
    state.defaultFamily = newData
  },
  [FONT_FAMILY_VISIBLE](state, newData) {
    state.fontFamilyVisible = newData
  },
  [DEFAULT_THEME](state, newData) {
    state.defaultTheme = newData
  }
}
